Skip to content

Conversation

@FooFindBar
Copy link
Collaborator

Description

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

close #529

Copy link
Collaborator

@fengju0213 fengju0213 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this pr! left some comment

if (isToolInstalled.success) {
log.info('Tool installed, starting backend service...');

// Notify frontend installation success
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! a question though:
Looking at startBackend() in init.ts:209, it resolves as soon as it sees "Uvicorn running on":

if (!started && data.toString().includes("Uvicorn running on")) {
    started = true;
    resolve(node_process);  // Resolves immediately
}

There could still be a gap between Uvicorn starting and FastAPI routes being fully loaded. If users submit tasks immediately after installation completes, won't we still hit the race condition from issue #529?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a health check poll before notifying the frontend?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Task submission fails if sent immediately after dependency installation

3 participants